package com.hmily.dubbo.provider.spi.jdk;

import java.time.chrono.Chronology;
import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * <h1>测试Java自带的jdk spi。</h1>
 *
 * @author hmilyylimh
 * ^_^
 * @version 0.0.1
 * ^_^
 * @date 2021-11-13
 */
public class TestJdkSpiAction {

    public static void main(String[] args) {
        ServiceLoader<Chronology> loader = ServiceLoader.load(Chronology.class);
        Iterator<Chronology> it = loader.iterator();
        while (it.hasNext()){
            System.out.println(it.next());
        }
    }
}